package viper.diversity;

public class Test232 {
		/**
		 * @param args
		 */
	public static void main(String[] args) {
		//DD diverse = new DD();
		byte [] uno = {0,1,2,3,4};
		byte [] dos = {5,6,7,8,9};
		byte [][] first = Diversity.diversify(uno, dos);
		for ( int i=0; i <first.length; i++){
				System.out.println("Packet "+ i+ " is:[");
				for(int j = 0; j<first[i].length; j++){
					System.out.print(first[i][j]+", ");
				}
				System.out.println("]");
			}
		byte [] [] undddd;
		System.out.print("Perfect transmission Packet 1,2, and 3 yields:\n"); 
		 undddd = Dediversity.undiversify(first[0],first[1],first[2]);
		for ( int i=0; i <undddd.length; i++){
			if(undddd[i]==null){
				System.out.print("Packet "+ i + " is null\n");	
			}
			else{
				System.out.println("Packet "+ i+ " is:[");
				for(int j = 0; j<undddd[i].length; j++){
					System.out.print(undddd[i][j]+", ");
				}
				System.out.println("]");
			}
		}
		System.out.print("\n\n Transmission Packet 1,2, and !3 yields:\n"); 
		undddd = Dediversity.undiversify(first[0],first[1], null);
		for ( int i=0; i <undddd.length; i++){
			if(undddd[i]==null){
				System.out.print("Packet "+ i + " is null\n");	
			}
			else{
				System.out.println("Packet "+ i+ " is:[");
				for(int j = 0; j<undddd[i].length; j++){
					System.out.print(undddd[i][j]+", ");
				}
				System.out.println("]");
			}
		}
		System.out.print("\n\n Transmission Packet 1,!2, and 3 yields:\n"); 
		undddd =Dediversity.undiversify(first[0],null, first[2]);
		for ( int i=0; i <undddd.length; i++){
			if(undddd[i]==null){
				System.out.print("Packet "+ i + " is null\n");	
			}
			else{
				System.out.println("Packet "+ i+ " is:[");
				for(int j = 0; j<undddd[i].length; j++){
					System.out.print(undddd[i][j]+", ");
				}
				System.out.println("]");
			}
		}
		System.out.print("\n\n Transmission Packet 1,!2, and !3 yields:\n"); 
		undddd = Dediversity.undiversify(first[0],null, null);
		for ( int i=0; i <undddd.length; i++){
			if(undddd[i]==null){
				System.out.print("Packet "+ i + " is null\n");	
			}
			else{
				System.out.println("Packet "+ i+ " is:[");
				for(int j = 0; j<undddd[i].length; j++){
					System.out.print(undddd[i][j]+", ");
				}
				System.out.println("]");
			}
		}
		System.out.print("\n\n Transmission Packet !1,2, and 3 yields:\n"); 
		undddd = Dediversity.undiversify(null,first[1], first[2]);
		for ( int i=0; i <undddd.length; i++){
			if(undddd[i]==null){
				System.out.print("Packet "+ i + " is null\n");	
			}
			else{
				System.out.println("Packet "+ i+ " is:[");
				for(int j = 0; j<undddd[i].length; j++){
					System.out.print(undddd[i][j]+", ");
				}
				System.out.println("]");
			}
		}
		System.out.print("\n\n Transmission Packet !1,2, and !3 yields:\n"); 
		undddd = Dediversity.undiversify(null,first[1], null);
		for ( int i=0; i <undddd.length; i++){
			if(undddd[i]==null){
				System.out.print("Packet "+ i + " is null\n");	
			}
			else{
				System.out.println("Packet "+ i+ " is:[");
				for(int j = 0; j<undddd[i].length; j++){
					System.out.print(undddd[i][j]+", ");
				}
				System.out.println("]");
			}
		}
		System.out.print("\n\n Transmission Packet !1,!2, and 3 yields:\n"); 
		undddd = Dediversity.undiversify(null,null, first[2]);
		for ( int i=0; i <undddd.length; i++){
			if(undddd[i]==null){
				System.out.print("Packet "+ i + " is null\n");	
			}
			else{
				System.out.println("Packet "+ i+ " is:[");
				for(int j = 0; j<undddd[i].length; j++){
					System.out.print(undddd[i][j]+", ");
				}
				System.out.println("]");
			}
		}
		System.out.print("\n\n Transmission Packet !1,!2, and !3 yields:\n"); 
		undddd = Dediversity.undiversify(null,null, null);
		for ( int i=0; i <undddd.length; i++){
			if(undddd[i]==null){
				System.out.print("Packet "+ i + " is null\n");	
			}
			else{
				System.out.println("Packet "+ i+ " is:[");
				for(int j = 0; j<undddd[i].length; j++){
					System.out.print(undddd[i][j]+", ");
				}
				System.out.println("]");
			}
		}
		
		
	}

}


